<template>
  <div>
    <!--    <FormPanel ref="from" :list="formList"  @formChange="changeHandle" :isSubmitBtn="false" :collapse="false" :labelWidth="190"></FormPanel>-->
    <FormPanel ref="from" :list="formList" :isSubmitBtn="false" :collapse="false" :labelWidth="190"></FormPanel>

    <el-tabs v-model="activeName" @tab-click="handleClick" :before-leave="beforeHandle">
      <el-tab-pane label="计划明细" name="first">
        <!-- <FilterTable
          ref="table"
          height="auto"
          :columns="columns"
          :dataSource="tableList"
          :onSyncTableData="syncTableFun"
          :onRowSelectChange="selectChangeHandle"
          :onColumnsChange="(columns) => (this.columns = columns)"
        > -->
        <FilterTable ref="table" height="auto" :columns="columns" :dataSource="tableList" :isSelectColumn="false" :onColumnsChange="(columns) => (this.columns = columns)">
          <template slot="controls">
            <!-- <multiuse-button size="small" type="primary" :click="addHandle" v-if="this.rowData.planStatus == 24041001">新 建</multiuse-button> -->
            <!-- <multiuse-button size="small" type="primary" :click="deleteHandle">删 除</multiuse-button> -->
          </template>
        </FilterTable>
      </el-tab-pane>
      <el-tab-pane label="计划汇总" name="second">
        <FilterTable ref="tableInfo" height="auto" :columns="columns1" :isSelectColumn="false" :dataSource="tableList1" :onColumnsChange="(columns1) => (this.columns1 = columns1)"> </FilterTable>
      </el-tab-pane>
    </el-tabs>

    <!-- <BaseDialog :visible.sync="isShow" title="选择车辆" :width="'70%'" destroyOnClose :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
      <addCar :rowData="rowData" @close="closeHandler" />
    </BaseDialog> -->
    <BaseDialog :visible.sync="isClient" :title="'订购方式'" destroyOnClose :width="'30%'" :containerStyle="{ height: 'calc(100% - 60px)', overflow: 'auto', paddingBottom: '60px' }">
      <div>
        <FormPanel ref="fromUpdate" :list="formList1" :cols="2" :isSubmitBtn="false" :collapse="false" labelWidth="110" />
        <div style="height: 47px"></div>
        <div
          :style="{
            position: 'absolute',
            left: 0,
            bottom: 0,
            right: 0,
            zIndex: 9,
            borderTop: '1px solid #e9e9e9',
            padding: '10px 20px',
            background: '#fff',
            textAlign: 'right',
          }"
        >
          <el-button @click="closeDrawer1(1)">关 闭</el-button>
          <multiuse-button type="primary" @click="closeDrawer1(2)">确 认</multiuse-button>
        </div>
      </div>
    </BaseDialog>
    <div
      :style="{
        position: 'absolute',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 9,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'right',
      }"
    >
      <el-button @click="closeDrawer(1)">关 闭</el-button>
      <!-- <multiuse-button type="primary" :click="closeDrawer.bind(this, 2)">导出明细</multiuse-button>
      <multiuse-button :click="saveByIdsFun" type="primary">保 存</multiuse-button> -->
    </div>
  </div>
</template>
<script>
import moment from 'moment';
import { saveByIds, getCreatePlanInfo, queryAllPlanDetail, updateReport } from '@/api/dealerSale/salesPlan/MonthPlanReport';
import { dictionary } from '@/utils/dictMixin';
// import addCar from './addCar';

export default {
  props: ['rowData', 'isAddPlan'],
  mixins: [dictionary],
  data() {
    return {
      formList: this.createdFrom(),
      formList1: this.createdFrom1(),
      columns: this.createdTable(),
      tableList: [],
      columns1: this.createdTable1(),
      tableList1: [],
      deleteData: [],
      isShow: false,
      isDisabled: true,
      activeName: 'first',
      isClient: false,
      dividData: null,
      unlock: false,
    };
  },
  components: {
    // addCar,
  },
  mounted() {
    this.BaseTable = this.$refs.table.$refs.pageTable;
    this.table = this.$refs.tableInfo.$refs.pageTable;
  },
  created() {
    // this.getPlanInfo();
    this.init();
  },
  methods: {
    //初始化数据
    async init() {
      //给FromPanl赋值
      if (this.rowData.planStatus === 24041001) this.unlock = true;
      for (let i in this.rowData) {
        this.formList.map((x) => {
          if (x.fieldName == i) {
            x.initialValue = this.rowData[i];
          }
        });
      }
      //给表格赋值
      const res = await queryAllPlanDetail({ id: this.rowData.id });
      if (res.resultCode === 200) {
        let data = res.data;
        let addressList = data[0].addressDtos;
        data.forEach((element) => {
          addressList.forEach((e) => {
            if (e.addressId === element.addressId) {
              element.cityId = e.cityId;
              element.linkMan = e.linkMan;
              element.linkPhone = e.linkPhone;
            }
          });
        });
        this.tableList = data;
      }
    },
    // async editHandle(data, type) {
    //   if (type == 1) {
    //     await this.$confirm('是否确定删除?', '提示', {
    //       confirmButtonText: '确定',
    //       cancelButtonText: '取消',
    //       type: 'warning',
    //     })
    //       .then(async () => {
    //         this.BaseTable.EXECUTE_DELETE([data]);
    //       })
    //       .catch(() => {});
    //   } else if (type === 2) {
    //     // this.BaseTable.EXECUTE_INSERT([data]);
    //     if (data.planNum === '') {
    //       this.$notify({
    //         title: '警告',
    //         message: '未填提报数量',
    //         type: 'warning',
    //       });
    //       return false;
    //     }
    //     this.isClient = true;
    //     // await this.$refs.fromUpdate.RESET_FORM();
    //     this.dividData = data;
    //   }
    // },
    beforeHandle() {
      for (let i in this.tableList) {
        if (this.tableList[i].planNum === '') {
          this.activeName = 'first';
          this.$notify({
            title: '警告',
            message: '未填提报数量',
            type: 'warning',
          });
          this.tableList1 = [];
          return false;
        }
      }
    },
    handleClick(tab, event) {
      let a = this.tableList;
      if (tab.index === '0') {
        this.tableList1 = [];
      }
      a.forEach((e) => {
        e.general = 0;
        e.urgent = 0;
        e.emergency = 0;
        e.iswkc = 1;
        if (e.urgency === 21011001) {
          //一般
          e.general += Number(e.planNum);
        }
        if (e.urgency === 21011002) {
          //急
          e.urgent += Number(e.planNum);
        }
        if (e.urgency === 21011003) {
          // 紧急
          e.emergency += Number(e.planNum);
        }
        e.subtotal = e.urgent + e.emergency + e.general;
      });
      if (tab.index === '1') {
        if (a.length > 1) {
          for (let i = 0; i < a.length; i++) {
            if (a[i].iswkc === 0) {
              continue;
            }
            for (let j = i + 1; j < a.length && a[j].iswkc === 1; j++) {
              if (a[j].iswkc === 0) {
                continue;
              }
              if (a[i].productCode === a[j].productCode) {
                a[i].general += a[j].general;
                a[i].urgent += a[j].urgent;
                a[i].emergency += a[j].emergency;
                a[i].subtotal += a[j].subtotal;
                a[j].iswkc = 0;
              }
            }
          }
        }
        let arr = [];
        a.forEach((e) => {
          if (e.iswkc === 1) {
            arr.push(e);
          }
        });
        this.table.EXECUTE_INSERT(arr);
      }
    },
    changeNum(index, data) {
      let num = '';
      let str = '';
      for (let i in index) {
        num = index[i];
        str = i.split('|')[0];
      }
      let Rep = /^[1-9]\d*$/;
      if (num > 10000000000) {
        this.$notify({
          title: '警告',
          message: '输入数量过大',
          type: 'warning',
        });
        return;
      }
      if (Rep.test(num)) {
        // for (let i in this.tableList) {
        //   if (this.tableList[i].addNum !== '' || Number(this.tableList[i].addNum) == NaN) {
        //     let pre = this.tableList[i].planNum;
        //     let add = this.tableList[i].addNum;
        //     let precent = 0.3;
        //     if (Math.floor(pre * (1 + precent)) >= Number(pre) + Number(add)) {
        //       this.tableList[i].planNum = Number(pre) + Number(add);
        //     } else {
        //       this.$notify({
        //         title: '警告',
        //         message: '第${i}行添加数量过多',
        //         type: 'warning',
        //       });
        //       return false;
        //     }
        //   }
        // }
        let pre = data.planNum;
        let add = data.adjustNum;
        let precent = 0.3;
        if (Math.floor(pre * (1 + precent)) >= Number(pre) + Number(add)) {
          this.tableList[i].planNum = Number(pre) + Number(add);
        } else {
          this.$notify({
            title: '警告',
            message: '该添加数量过多',
            type: 'warning',
          });
          return false;
        }
      }
    },
    // async deleteHandle(data, type) {
    //   await this.$confirm('是否确定删除?', '提示', {
    //     confirmButtonText: '确定',
    //     cancelButtonText: '取消',
    //     type: 'warning',
    //   })
    //     .then(async () => {
    //       this.BaseTable.EXECUTE_DELETE(this.deleteData);
    //       this.deleteData = [];
    //       this.BaseTable.DO_REFRESH();
    //     })
    //     .catch(() => {});
    // },
    // selectChangeHandle(rows) {
    //   this.deleteData = rows;
    // },
    // async getPlanInfo() {
    //   const res = await getCreatePlanInfo();
    //   if (res.resultCode === 200) {
    //     for (let i in res.data) {
    //       this.formList.map((x) => {
    //         if (x.fieldName == i) {
    //           x.initialValue = res.data[i];
    //         }
    //       });
    //     }
    //     if (this.isAddPlan) {
    //       this.formList[2].initialValue = moment().format('YYYY-MM');
    //     } else {
    //       this.formList[2].initialValue = moment().subtract(-1, 'months').format('YYYY-MM');
    //     }
    //     // moment().subtract(-1, 'months').format('YYYY-MM');
    //   }
    // },
    // syncTableFun(data) {
    //   if (data.length > 0) {
    //     data.map((val) => {
    //       val.total = parseInt(val.quantity1) + parseInt(val.quantity2 || 0) + parseInt(val.quantity3 || 0);
    //       this.columns.map((x) => {
    //         if (x.dataIndex == 'n1') {
    //           x.children[0].editable = val.isAddOne == 10041001 ? true : false;
    //           x.children[0].defaultEditable = val.isAddOne == 10041001 ? true : false;
    //           x.children[0].editRequired = val.isAddOne == 10041001 ? true : false;
    //         }
    //       });
    //     });
    //     this.tableList = data;
    //   }
    // },
    // addHandle() {
    //   this.isShow = true;
    // },
    closeHandler(type, data) {
      if (data) {
        let is = false;
        this.tableList.map((x) => {
          data.forEach((e) => {
            if (x.productCode == e.productCode) {
              is = true;
            }
          });
        });
        if (!is) {
          this.isShow = type;
          this.isDisabled = false;
          this.BaseTable.EXECUTE_INSERT(data);
        } else {
          // 提示
          this.$notify({
            title: '警告',
            message: '列表已有该车辆',
            type: 'warning',
          });
          return;
        }
      }
    },
    closeDrawer(type) {
      if (type === 1) {
        this.$emit('close', false);
      } else if (type === 2) {
        //导出
      }
    },
    async closeDrawer1(type) {
      if (type === 1) {
        this.$emit('close', false);
        this.dividData = null;
      } else if (type === 2) {
        let json = this.$refs.fromUpdate.SUBMIT_FORM();
        var copy1 = JSON.parse(JSON.stringify(this.dividData));
        var copy2 = JSON.parse(JSON.stringify(this.dividData));
        if (Number(this.dividData.planNum) - Number(json.planNum) <= 0) {
          this.$notify({
            title: '警告',
            message: '数量有误',
            type: 'warning',
          });
        } else if (this.dividData.urgency === json.urgency) {
          this.$notify({
            title: '警告',
            message: '紧急度不能相同',
            type: 'warning',
          });
        } else {
          copy1.planNum = Number(this.dividData.planNum) - Number(json.planNum);
          copy2.planNum = Number(json.planNum);
          copy2.urgency = json.urgency;
          copy2.demandPlan1DetailId = null;
          this.BaseTable.EXECUTE_DELETE([this.dividData]);
          this.BaseTable.EXECUTE_INSERT([copy1, copy2]);
          this.dividData = null;
          this.$refs.fromUpdate.RESET_FORM();
          this.isClient = false;
          this.$notify({
            title: '成功',
            message: '拆分成功',
            type: 'success',
          });
          return;
        }
      }
    },
    // async saveByIdsFun() {
    //   if (this.tableList.length < 1) {
    //     this.$notify({
    //       title: '警告',
    //       message: '至少添加一行数据',
    //       type: 'warning',
    //     });
    //     return false;
    //   }
    //   if (this.BaseTable.GET_REQUIRED_ERROR() != null) {
    //     for (let i in this.tableList) {
    //       if (this.tableList[i].accountId === '') {
    //         this.$notify.warning({ title: '提示信息', message: '资金类型不可为空！' });
    //         break;
    //       }
    //       if (this.tableList[i].addressId === '') {
    //         this.$notify.warning({ title: '提示信息', message: '收车地址不可为空！' });
    //         break;
    //       }
    //     }
    //     return false;
    //   }
    //   for (let i in this.tableList) {
    //     if (i==='dataMark'||this.tableList[i].addNum == '') {
    //       continue;
    //     } else {
    //       let pre = this.tableList[i].planNum;
    //       let add = this.tableList[i].addNum;
    //       let precent = 0.3;
    //       if (Math.floor(pre * (1 + precent)) >= Number(pre) + Number(add)) {
    //         this.tableList[i].planNum = Number(pre) + Number(add);
    //       } else {
    //         this.$notify({
    //           title: '警告',
    //           message: '添加数量过多',
    //           type: 'warning',
    //         });
    //         return false;
    //       }
    //     }
    //   }
    //   this.rowData.details = this.tableList;
    //   let res = await updateReport(this.rowData);
    //   if (res.resultCode === 200) {
    //     this.$notify({
    //       title: '成功',
    //       message: '保存成功',
    //       type: 'success',
    //     });
    //     this.$emit('close', this.tableList);
    //   } else {
    //   }
    // },
    createdFrom() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '计划信息',
        },
        {
          type: 'INPUT',
          label: '计划编号',
          fieldName: 'plan1No',
          placeholder: '请输入',
          disabled: true,
        },
        {
          type: 'DATE',
          label: '计划年月',
          fieldName: 'planYearAndMonth',
          disabled: true,
          placeholder: '请输入',
          dateType: 'month',
        },
        {
          type: 'SELECT',
          label: '计划状态',
          fieldName: 'planStatus',
          disabled: true,
          placeholder: '请选择',
          itemList: this.createDictList('2404'),
          // initialValue: 61041001
        },
        {
          type: 'SELECT',
          label: '计划类型',
          fieldName: 'plan1Type',
          disabled: true,
          placeholder: '请选择',
          itemList: this.createDictList('2405'),
        },
        {
          type: 'INPUT',
          label: '经销商代码',
          fieldName: 'ownerCode',
          placeholder: '请输入',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '经销商名称',
          fieldName: 'dealerName',
          placeholder: '请输入',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '创建人',
          fieldName: 'createdBy',
          placeholder: '请输入',
          disabled: true,
        },
        {
          type: 'INPUT',
          label: '创建时间',
          fieldName: 'createdAt',
          placeholder: '请输入',
          disabled: true,
        },
      ];
    },
    createdFrom1() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '拆分信息',
        },
        {
          type: 'INPUT_NUMBER',
          label: '数量',
          fieldName: 'planNum',
          placeholder: '请输入数字',
          rules: [{ required: true, message: '请输入', trigger: 'change' }],
        },

        {
          type: 'SELECT',
          label: '紧急度',
          fieldName: 'urgency',
          placeholder: '请选择',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          itemList: this.createDictList('2101'),
        },
      ];
    },
    createdTable() {
      return [
        // {
        //   title: '操作',
        //   dataIndex: 'column-action',
        //   width: 120,
        //   fixed: 'left',
        //   render: (props, h) => {
        //     return (
        //       <div>
        //         <multiuse-button size="mini" type="text" onClick={() => this.editHandle(props.row, 1)}>
        //           删除
        //         </multiuse-button>
        //         <el-divider direction="vertical" />
        //         <multiuse-button size="mini" type="text" onClick={() => this.editHandle(props.row, 2)}>
        //           拆分
        //         </multiuse-button>
        //       </div>
        //     );
        //   },
        // },
        {
          title: '序号',
          dataIndex: 'index',
          width: 80,
          sorter: true,
          render: (props) => {
            return <span>{props.row.index + 1}</span>;
          },
        },
        {
          title: '物料编码',
          dataIndex: 'productCode',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '物料描述',
          dataIndex: 'productName',
          align: 'center',
          width: 400,
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '指标类别',
          dataIndex: 'targetType',
          sorter: true,
          filter: true,
          filterType: 'input',
          render: (props) => {
            //编码转汉字
            return <span>{this.createDictText(props.row.targetType, '2403')}</span>;
          },
        },
        {
          title: '提报数量',
          type: 'n',
          dataIndex: 'planNum',
          sorter: true,
          filter: true,
          filterType: 'input',
          editable: true,
          editType: 'number',
          width: 100,
          editRequired: true,
          editPattern: /^[1-9]\d*$/,
          summation: true,
          defaultEditable: false,
          rules: [{ required: true, message: '请填写正整数', trigger: 'blur' }],
          disabled: this.rowData.planStatus !== 24041001,
          align: 'center',
        },
        {
          title: '调整数量',
          dataIndex: 'adjustNum',
          sorter: true,
          filter: true,
          filterType: 'input',
          editable: true,
          editType: 'number',
          width: 100,
          editPattern: /^[1-9]\d*$/,
          summation: true,
          defaultEditable: true,
          disabled: true,
          // hidden: this.rowData.planStatus == 24041001,
          // rules: [{ required: true, message: '请填写正整数', trigger: 'blur' }],
          onInput: (index, data) => {
            this.changeNum(index, data);
          },
        },
        {
          title: '紧急度',
          dataIndex: 'urgency',
          sorter: true,
          filter: true,
          filterType: 'input',
          editRequired: true,
          rules: [{ required: true, message: '请填写', trigger: 'blur' }],
          render: (p) => {
            return (
              <el-select
                size="mini"
                disabled
                v-model={p.row.urgency}
                placeholder="请选择"
                onChange={(value) => {
                  p.row.urgency = value;
                }}
              >
                {this.createDictList('2101').map((item) => (
                  <el-option key={item.value} label={item.text} value={item.value} />
                ))}
              </el-select>
            );
          },
        },
        {
          title: '车辆用途',
          dataIndex: 'vehicleUser',
          sorter: true,
          filter: true,
          filterType: 'input',
          editRequired: true,
          width: 200,
          showOverflowTooltip: false,
          rules: [{ required: true, message: '请填写', trigger: 'blur' }],
          render: (p) => {
            return (
              <el-select
                size="mini"
                disabled
                v-model={p.row.vehicleUser}
                placeholder="请选择"
                onChange={(value) => {
                  p.row.vehicleUser = value;
                }}
              >
                {this.createDictList('2406')
                  .slice(0, 2)
                  .map((item) => (
                    <el-option key={item.value} label={item.text} value={item.value} />
                  ))}
              </el-select>
            );
          },
        },
        {
          title: '资金类型',
          dataIndex: 'accountId',
          sorter: true,
          filter: true,
          filterType: 'input',
          editRequired: true,
          width: 200,
          showOverflowTooltip: false,
          rules: [{ required: true, message: '请填写', trigger: 'blur' }],
          render: (p) => {
            return (
              <el-select
                size="mini"
                disabled
                v-model={p.row.accountId}
                placeholder="请选择"
                onChange={(value) => {
                  p.row.accountId = value;
                }}
              >
                {p.row.accountTypes.map((item) => (
                  <el-option key={item.accountId} label={item.accountTypeName} value={item.accountId} />
                ))}
              </el-select>
            );
          },
        },
        {
          title: '收车地址',
          dataIndex: 'addressId',
          sorter: true,
          filter: true,
          filterType: 'input',
          editRequired: true,
          width: 200,
          showOverflowTooltip: false,
          rules: [{ required: true, message: '请填写', trigger: 'blur' }],
          render: (p) => {
            return (
              <el-select
                size="mini"
                disabled
                v-model={p.row.addressId}
                placeholder="请选择"
                onChange={(value) => {
                  p.row.addressId = value;
                  for (let x of p.row.addressDtos) {
                    if (x.addressId == value) {
                      p.row.cityId = x.cityId;
                      p.row.linkMan = x.linkMan;
                      p.row.linkPhone = x.linkPhone;
                      break;
                    }
                  }
                }}
              >
                {p.row.addressDtos.map((item) => (
                  <el-option key={item.addressId} label={item.address} value={item.addressId} />
                ))}
              </el-select>
            );
          },
        },
        {
          title: '城市',
          dataIndex: 'cityId',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '联系人',
          dataIndex: 'linkMan',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '联系电话',
          dataIndex: 'linkPhone',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '市场指导价',
          dataIndex: 'oemDirectivePrice',
          sorter: true,
          filter: true,
          filterType: 'input',
          precision: 2,
        },
        {
          title: '车系名称',
          dataIndex: 'seriesName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '车型名称',
          dataIndex: 'modelName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '配置名称',
          dataIndex: 'configName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '选装名称',
          dataIndex: 'optionName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '内饰',
          dataIndex: 'trimColorName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '外饰',
          dataIndex: 'colorName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
      ];
    },

    createdTable1() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 80,
          sorter: true,
          render: (props) => {
            return <span>{props.row.index + 1}</span>;
          },
        },

        {
          title: '物料编码',
          dataIndex: 'productCode',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '物料描述',
          dataIndex: 'productName',
          align: 'center',
          width: 400,
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '物料汇总数量',
          dataIndex: 'productTotalNum',
          sorter: true,
          filter: true,
          align: 'center',
          width: 400,
          filterType: 'input',
          children: [
            {
              title: '急',
              type: 'number',
              dataIndex: 'urgent',
              filterType: 'input',
              align: 'center',
              summation: true,
            },
            {
              title: '一般',
              type: 'number',
              dataIndex: 'general',
              filterType: 'input',
              align: 'center',
              summation: true,
            },
            {
              title: '紧急',
              type: 'number',
              dataIndex: 'emergency',
              filterType: 'input',
              align: 'center',
              summation: true,
            },
            {
              title: '小计',
              type: 'number',
              dataIndex: 'subtotal',
              filterType: 'input',
              align: 'center',
              summation: true,
            },
          ],
        },

        {
          title: '车系',
          dataIndex: 'seriesName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '车型名称',
          dataIndex: 'modelName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '配置',
          dataIndex: 'configName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '选装',
          dataIndex: 'optionName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '内饰',
          dataIndex: 'trimColorName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '外饰',
          dataIndex: 'colorName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
      ];
    },
  },
};
</script>

